import typescript from "@rollup/plugin-typescript";

// 参考https://juejin.cn/post/7308925069916258356
const isDev = () => {
  return process.env.NODE_ENV === "development";
};

export default {
  input: "src/client/main.ts", 
  output: {
    file: "dist/bundle.js",
    format: "iife", // 立即执行函数表达式（适合浏览器）
    sourcemap: true,
  },
  plugins: [
    typescript({
      compilerOptions: {
        module: "esnext",
      },
    }),
  ],
};
